<?php
class area extends Model {
	/**
	 * 获取地址信息
	 *
	 * @param unknown_type $id        	
	 * @return Ambigous <boolean, multitype:>
	 */
	public function getareainfofromid($id) {
		$sql = "SELECT `yitao_province`.*
				FROM `yitao_province`
			WHERE `yitao_province`.`id` = '" . $id . "'";
		// echo $sql;
		return $this->fetchRow ( $sql );
	}
	
	/**
	 * 获取下级地址ID
	 *
	 * @param unknown_type $id        	
	 * @return Ambigous <boolean, multitype:>
	 */
	public function getunionaddrlist($pid) {
		$sql = "SELECT `yitao_province`.*
				FROM `yitao_province`  WHERE `yitao_province`.`pid`='" . $pid . "'";
		// echo $sql;
		return $this->fetchAll ( $sql );
	}
	/**
	 * 获取学校信息
	 *
	 * @param unknown_type $id        	
	 * @return Ambigous <boolean, multitype:>
	 */
	public function getschoollist($pid) {
		$sql = "SELECT `yitao_school`.*
				FROM `yitao_school`  WHERE `yitao_school`.`pid`='" . $pid . "'";
		// echo $sql;
		return $this->fetchAll ( $sql );
	}
}